package com.zhang.family_doctor.service;

import com.github.pagehelper.PageInfo;
import com.zhang.family_doctor.entity.Mechanism;
import com.zhang.family_doctor.entity.R;

public interface MechanismService {

    /**
     * 新增机构
     * @param mechanism
     * @return
     */
    R<String> save(Mechanism mechanism);

    /**
     * 修改机构
     * @param mechanism
     * @return
     */
    R<String> update(Mechanism mechanism);

    /**
     * 分页查询机构
     * @param pageNum
     * @param pageSize
     * @param companyName
     * @return
     */
    R<PageInfo<Mechanism>> getList(Integer pageNum, Integer pageSize, String companyName);

    /**
     * 根据id删除机构
     * @param id
     * @return
     */
    R<String> delete(Integer id);

    /**
     * 禁用或启用
     * @param id
     * @param state
     * @return
     */
    R<String> updateStateById(Integer id, Integer state);
}
